package com.hhq.sso.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.hhq.sso.common.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * Description: 行政区划表实体类
 * </p>
 *
 * @author : xiaodong.yang
 * @date : 2024/6/14 18:24
 */
@Data
@TableName("t_region")
@Schema(description = "Region对象")
public class Region extends BaseEntity {

    /**
     * 区划编号
     */
    @Schema(description = "区划编号")
    private String code;
    /**
     * 父区划编号
     */
    @Schema(description = "父区划编号")
    private String parentCode;
    /**
     * 祖区划编号
     */
    @Schema(description = "祖区划编号")
    private String ancestors;
    /**
     * 区划名称
     */
    @Schema(description = "区划名称")
    private String name;
    /**
     * 省级区划编号
     */
    @Schema(description = "省级区划编号")
    private String provinceCode;
    /**
     * 省级名称
     */
    @Schema(description = "省级名称")
    private String provinceName;
    /**
     * 市级区划编号
     */
    @Schema(description = "市级区划编号")
    private String cityCode;
    /**
     * 市级名称
     */
    @Schema(description = "市级名称")
    private String cityName;
    /**
     * 区级区划编号
     */
    @Schema(description = "区级区划编号")
    private String districtCode;
    /**
     * 区级名称
     */
    @Schema(description = "区级名称")
    private String districtName;
    /**
     * 镇级区划编号
     */
    @Schema(description = "镇级区划编号")
    private String townCode;
    /**
     * 镇级名称
     */
    @Schema(description = "镇级名称")
    private String townName;
    /**
     * 村级区划编号
     */
    @Schema(description = "村级区划编号")
    private String villageCode;
    /**
     * 村级名称
     */
    @Schema(description = "村级名称")
    private String villageName;
    /**
     * 层级
     */
    @Schema(description = "层级")
    private Integer level;
    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer sort;
    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 父类id
     */
    @TableField(exist = false)
    private Long parentId;
    /**
     * 是否有子孙节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Boolean hasChildren;
}
